import { createSlice } from "@reduxjs/toolkit";

const storeSlice = createSlice({
  name: "store",
  initialState: {
    loading: true,
  },
  reducers: {
    open(state) {
      state.loading = true;
    },
    close(state) {
      state.loading = false;
    },
  },
});

export default storeSlice;
export const { open: openLoading, close: closeLoading } = storeSlice.actions;
